package com.bulls.demo.hrmsdemo.ib;

import javax.persistence.EntityManager;

import com.bulls.demo.hrmsdemo.dao.SignupDAO;
import com.bulls.demo.hrmsdemo.dao.SignupDAOImpl;
import com.bulls.demo.hrmsdemo.dao.VendorMasterDAO;
import com.bulls.demo.hrmsdemo.dao.VendorMasterDAOImpl;
import com.bulls.demo.hrmsdemo.db.Vendor;

public class VendorMasterLogic {
	
	static VendorMasterDAO vendorMasterDAO;
	public static VendorMasterDAO getDAO(){
		VendorMasterDAOImpl vendorMasterDAOImpl = new VendorMasterDAOImpl();
		vendorMasterDAO = vendorMasterDAOImpl;
		return vendorMasterDAO;
	}
	
	public static Vendor save(Vendor vendor,EntityManager em){
		vendor = getDAO().save(vendor, em);
		return vendor;
	}
	
	public static Vendor search(String string,EntityManager em){
		Vendor vendor = getDAO().search(string, em);
		return vendor;
	}
	
	public static boolean delete(long vendorSK,EntityManager em){
		boolean boo = getDAO().delete(vendorSK, em);
		return boo;
	}

}
